package com.yz.design.factoryDesign.factory;


/**
 * 工厂模式 一个工厂生产单一产品,可有不同品牌
 */
public class Main {
    public static void main(String[] args) {
        // 1.惠普工厂 生产鼠标
        Factory factory = new HPFactory();
        IMouse mouse = factory.getMouse();
        System.out.println(mouse.getMouseInfo());
        // 2.联想工厂 生产鼠标
        Factory factory2 = new LenoveFactory();
        IMouse mouse1 = factory2.getMouse();
        System.out.println(mouse1.getMouseInfo());

    }
}